Ext.define('AmpleHarvest.objects.userprofile.view.ProfileForm',
{
   extend      : 'Ext.form.Panel',
   requires    :
   [
         "Ext.form.field.Hidden", 
         "Ext.form.field.Text",
         "Ext.form.field.Checkbox", 
         "Ext.form.field.TextArea",
         "Ext.form.field.ComboBox",
         "AmpleHarvest.objects.classification.cPanel"
   ],
   uses        : [
   
   ],
   m_bool_Editable   : false,
   labelWidth     : 93,
   buttonAlign    : 'right',
   frame       : true,
   timeout        : 1000,
   bodyStyle      : 'padding:5px 5px 0',
   autoWidth      : true,
   autoHeight     : true,
   standardSubmit : false,
   defaultType    : 'textfield',

   initComponent  : function()
   {
      var obj_This = this;

         this.buttons =
         [
               {
                  text     : 'Close',
                  autoWidth   : true,
                  disabled : false,
                  handler     : function()
                  {
                     obj_This.ownerCt.close();
                  }
               }
         ];

      this.callParent();
      
      this.m_obj_Form_UserName = Ext.create("Ext.form.field.Display",
              {
                 fieldLabel  : "User",
                 name     : "User_Name",
                 inputType   : "textfield",
                 disabled : false,
                 anchor      : "100%",
                 allowBlank  : false
              });
        this.m_obj_Form_UserName.setValue(obj_config.user.userName);
        this.add(this.m_obj_Form_UserName);
        
        this.m_obj_Form_FirstName = Ext.create("Ext.form.field.Display",
                {
                   fieldLabel  : "First Name",
                   name     : "First_Name",
                   inputType   : "textfield",
                   disabled : false,
                   anchor      : "100%",
                   allowBlank  : false
                });
        this.m_obj_Form_FirstName.setValue(obj_config.user.firstName);
        this.add(this.m_obj_Form_FirstName);
        
        this.m_obj_Form_LastName = Ext.create("Ext.form.field.Display",
                {
                   fieldLabel  : "Last Name",
                   name     : "Last_Name",
                   inputType   : "textfield",
                   disabled : false,
                   anchor      : "100%",
                   allowBlank  : false
                });
        this.m_obj_Form_LastName.setValue(obj_config.user.lastName);
        this.add(this.m_obj_Form_LastName);
        
        this.m_obj_Form_MiddleName = Ext.create("Ext.form.field.Display",
                {
                   fieldLabel  : "Middle Name",
                   name     : "Middle_Name",
                   inputType   : "textfield",
                   disabled : false,
                   anchor      : "100%",
                   allowBlank  : false
                });
        this.m_obj_Form_MiddleName.setValue(obj_config.user.middleInitial);
        this.add(this.m_obj_Form_MiddleName);
        
        this.m_obj_Form_Phone1 = Ext.create("Ext.form.field.Display",
                {
                   fieldLabel  : "Phone 1",
                   name     : "Phone1",
                   inputType   : "textfield",
                   disabled : false,
                   anchor      : "100%",
                   allowBlank  : false
                });
        this.m_obj_Form_Phone1.setValue(obj_config.user.phone1);
        this.add(this.m_obj_Form_Phone1);
        
        this.m_obj_Form_Phone2 = Ext.create("Ext.form.field.Display",
                {
                   fieldLabel  : "Phone 2",
                   name     : "Phone2",
                   inputType   : "textfield",
                   disabled : false,
                   anchor      : "100%",
                   allowBlank  : false
                });
        this.m_obj_Form_Phone2.setValue(obj_config.user.phone2);
        this.add(this.m_obj_Form_Phone2);
        
        this.m_obj_Form_Email = Ext.create("Ext.form.field.Display",
                {
                   fieldLabel  : "Email",
                   name     : "Email",
                   inputType   : "textfield",
                   disabled : false,
                   anchor      : "100%",
                   allowBlank  : false
                });
        this.m_obj_Form_Email.setValue(obj_config.user.email1);
        this.add(this.m_obj_Form_Email);
        
        this.m_obj_Form_CurrentOrg = Ext.create("Ext.form.field.Display",
                {
                   fieldLabel  : "Current Org",
                   name     : "Current_Org",
                   inputType   : "textfield",
                   disabled : false,
                   anchor      : "100%",
                   allowBlank  : false
                });
        this.m_obj_Form_CurrentOrg.setValue(obj_config.user.currentOrg);
        this.add(this.m_obj_Form_CurrentOrg);
        
        this.m_obj_Form_AssignedOrg = Ext.create("Ext.form.field.Display",
                {
                   fieldLabel  : "Assigned Org",
                   name     : "Assigned_Org",
                   inputType   : "textfield",
                   disabled : false,
                   anchor      : "100%",
                   allowBlank  : false
                });
        this.m_obj_Form_AssignedOrg.setValue(obj_config.user.assignedOrg);
        this.add(this.m_obj_Form_AssignedOrg);   
       
        this.m_obj_Form_LastLogin = Ext.create("Ext.form.field.Display",
                {
                   fieldLabel  : "Last Login",
                   name     : "Last_Login",
                   inputType   : "textfield",
                   disabled : false,
                   anchor      : "100%",
                   allowBlank  : false
                });
        this.m_obj_Form_LastLogin.setValue(obj_config.user.lastLogin);
        this.add(this.m_obj_Form_LastLogin);
        
        this.m_obj_Form_DN = Ext.create("Ext.form.field.Display",
                {
                   fieldLabel  : "DN",
                   name     : "DN",
                   inputType   : "textfield",
                   disabled : false,
                   anchor      : "100%",
                   allowBlank  : false
                });
        this.m_obj_Form_DN.setValue(obj_config.user.dn);
        this.add(this.m_obj_Form_DN);
        
 
   }
}
);